package com.empire.module.sporttery.dal.mysql.football500yazim;

import java.util.*;

import com.empire.framework.common.pojo.PageResult;
import com.empire.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.empire.framework.mybatis.core.mapper.BaseMapperX;
import com.empire.module.sporttery.dal.dataobject.football500yazim.Football500YazImDO;
import org.apache.ibatis.annotations.Mapper;
import com.empire.module.sporttery.controller.admin.football500yazim.vo.*;

/**
 * 亚盘实时 Mapper
 *
 * @author 无敌仙人
 */
@Mapper
public interface Football500YazImMapper extends BaseMapperX<Football500YazImDO> {

    default PageResult<Football500YazImDO> selectPage(Football500YazImPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<Football500YazImDO>()
                .eqIfPresent(Football500YazImDO::getMatchId, reqVO.getMatchId())
                .eqIfPresent(Football500YazImDO::getYpId, reqVO.getYpId())
                .likeIfPresent(Football500YazImDO::getCompanyName, reqVO.getCompanyName())
                .eqIfPresent(Football500YazImDO::getImMainWater, reqVO.getImMainWater())
                .eqIfPresent(Football500YazImDO::getImMainWaterStatus, reqVO.getImMainWaterStatus())
                .eqIfPresent(Football500YazImDO::getImBall, reqVO.getImBall())
                .eqIfPresent(Football500YazImDO::getImBallNum, reqVO.getImBallNum())
                .eqIfPresent(Football500YazImDO::getImBallStatus, reqVO.getImBallStatus())
                .eqIfPresent(Football500YazImDO::getImCustomWater, reqVO.getImCustomWater())
                .eqIfPresent(Football500YazImDO::getImCustomWaterStatus, reqVO.getImCustomWaterStatus())
                .betweenIfPresent(Football500YazImDO::getImChangeTime, reqVO.getImChangeTime())
                .eqIfPresent(Football500YazImDO::getInitMainWater, reqVO.getInitMainWater())
                .eqIfPresent(Football500YazImDO::getInitBall, reqVO.getInitBall())
                .eqIfPresent(Football500YazImDO::getInitBallNum, reqVO.getInitBallNum())
                .eqIfPresent(Football500YazImDO::getInitCustomWater, reqVO.getInitCustomWater())
                .betweenIfPresent(Football500YazImDO::getInitChangeTime, reqVO.getInitChangeTime())
                .eqIfPresent(Football500YazImDO::getIsPatch, reqVO.getIsPatch())
                .orderByDesc(Football500YazImDO::getId));
    }

}